package template_funcs_util

import "strings"

// 获取映射的 URL
func GetMappedUrl(mappingUrls map[string]string, originalUrl string) string {
	trimedUrl := strings.Trim(originalUrl, " ")
	mappedUrl, ok := mappingUrls[trimedUrl]

	if !ok {
		return originalUrl
	}

	return mappedUrl
}
